home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiSliderTags.st
< prev
next >
Wrap
Text File
|
2002-05-07
|
3KB
|
85 lines
" --------------------------------------------------------------------- "
" BoopsiSliderTags Class is a Singleton class that allows the user "
" to reference BOOPSI Slider class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- sliderTags getTag: #SLIDER_Level' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" --------------------------------------------------------------------- "
Class BoopsiSliderTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
self at: #SLIDER_Min put: 16r85028001. " (WORD) . "
self at: #SLIDER_Max put: 16r85028002. " (WORD) . "
self at: #SLIDER_Level put: 16r85028003. " (WORD) . "
self at: #SLIDER_Orientation put: 16r85028004. " (WORD) . "
" (struct Hook *) A0 Hook, A2 Object, A1 TagList
* containing SLIDER_Level, SLIDER_ Min, SLIDER_Max,
* GA_ID, GA_UserInput.
"
self at: #SLIDER_DispHook put: 16r85028005.
self at: #SLIDER_Ticks put: 16r85028006. " (LONG) . "
self at: #SLIDER_ShortTicks put: 16r85028007. " (BOOL) . "
self at: #SLIDER_TickSize put: 16r85028008. " (WORD) . "
self at: #SLIDER_KnobImage put: 16r85028009. " (struct Image *) . "
self at: #SLIDER_BodyFill put: 16r8502800A. " (WORD) . "
self at: #SLIDER_BodyImage put: 16r8502800B. " (struct Image *) . "
" (BOOL) Gradient slider model, defaults to false. "
self at: #SLIDER_Gradient put: 16r8502800C.
" (UWORD *) Pens for gradient slider. "
self at: #SLIDER_PenArray put: 16r8502800D.
" (BOOL) Flip Min/Max positions. Defaults to false. "
self at: #SLIDER_Invert put: 16r8502800E.
self at: #SLIDER_KnobDelta put: 16r8502800F. " (WORD) . "
" SLIDER_Orientation Modes "
self at: #SORIENT_HORIZ put: 2. " FREEHORIZ "
self at: #SORIENT_VERT put: 4. " FREEVERT "
self at: #SLIDER_HORIZONTAL put: 2.
self at: #SLIDER_VERTICAL put: 4.
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]